# num = 10
# def funcA():
#     global num
#     num = 30
#     print(num)
# funcA()
# print(num)

# def is_allow(age):
#     if age > 18:
#        return "允许进入"
#     else:
#        return "禁止进入"
# print(is_allow(18))


# def test(name, age):
#     print("name:%s, age:%s" % (name, age))
# name = 20
# age = "tom"
# test(age, name)

# def print_info(name,gender=True):
#     print(gender, name)
# print_info("tom", gender = False)

# def sum_values(li):
#     sum = 0
#     for v in li:
#        sum+=v
#     return sum
# def get_avg(li):
#     sm = sum_values(li)
#     avg = sm/len(li)
#     print("平均值是：",avg)
# li = [1,2,3,4,5,6]
# li.append(7)
# print(get_avg(li))

# li = [1,2,3,4,5,6]
# print(li.append(7))

# def my_test(a=10, b): pass
# def my_test(a, *args): pass
# def my_test(a, *args, b=10, **kwargs): pass
# def my_test(a, b=10, *args, **kwargs): pass

# def sum_values(li):
#     sum = 0
#     for v in li:
#        sum+=v
# li = [1,2,3,4,5,6]
# sm = sum_values(li)
# avg = sm/len(li)
# print("平均值是：",avg)

# def my_sum(*args):
#     sum = 0
#     for v in args:
#         sum+=v
#     return sum
#
# print(my_sum(1))
# print(my_sum(1,2))
# print(my_sum(1,2,3))


# # ******
# li = [1,2,3]
# print(li)
# print(id(li))
# def md(li):
#     print(id(li))
#     li.append(7)
#     print(id(li))
#     li = [1,2]
#     print(id(li))
#     print(li)
# md(li)
# print(li)

li = [1,2,3]
print(li)
def md(li):
    li += [4,5]
    print(li)
md(li)
print(li)



# def print_info(name, *args, gender=True):
#     print(name, args, gender)
#
# print_info("tom", 66, 77, 88, False)

# d = {'a':1,'b':2}
# t = (1,2,3)
#
# def myprint(*args,**kwargs):
#     print(args)
#     print(kwargs)
#
# myprint(*t,**d)